package com.itmuch.cloud.study.user.feign.fallback;

import org.springframework.stereotype.Component;

import com.itmuch.cloud.study.user.entity.User;
import com.itmuch.cloud.study.user.feign.UserFeignClient;

/**
 * 回退类FeignClientFallback需要实现Feign Client接口
 * @author ThinkPad
 *
 */
@Component
public class FeignClientFallback implements UserFeignClient{
	@Override
	public User findById(Long id) {
		User user=new User();
		user.setId(-1L);
		user.setUsername("默认用户");
		return user;
	}
	

}
